﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for KhuyenMai
/// </summary>
public class EKhuyenMai
{
    private int maKM;
    private DateTime ngayBD;
    private DateTime ngayKThuc;
    private string tinhtrang;
    public EKhuyenMai()
    { }
    public EKhuyenMai(int maKM, DateTime ngayBD, DateTime ngayKThuc, string tinhtrang)
    {
        this.maKM = maKM;
        this.ngayBD = ngayBD;
        this.ngayKThuc = ngayKThuc;
        this.tinhtrang = tinhtrang;
    }
    public int MaKM
    {
        get { return this.maKM; }
        set
        {
            this.maKM = value;
        }
    }
    public DateTime NgayBD
    {
        get { return this.ngayBD; }
        set { this.ngayBD = value; }
    }
    public DateTime NgayKThuc
    {
        get { return this.ngayKThuc; }
        set { this.ngayKThuc = value; }
    }
    public string Tinhtrang
    {
        get { return this.tinhtrang; }
        set { this.tinhtrang = value; }
    }
    public override string ToString()
    {
        return this.maKM + "; " + this.ngayBD + "; " + this.ngayKThuc + "; " + this.tinhtrang + "; ";
    }
    public override bool Equals(Object obj)
    {
        EKhuyenMai me = (EKhuyenMai)obj;
        bool ret = this.MaKM.Equals(me.MaKM);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaKM.GetHashCode();
    }

}